import request from "@/utils/request";

/**
 * 获取配件备注模板列表
 */
export const getList=(data)=>{
    return request({
        url:"/mall/tenant/merchant/product-prize-info/list",
        method:"post",
        data
    })
}

/**
 * 关联商品列表
 */
export const getRelatedList=(data)=>{
    return request({
        url:"/mall/tenant/merchant/product-prize-info/search-products",
        method:"post",
        data
    })
}
/**
 * 根据id获取商品列表
 */
export const getRelatedListById=(prizeInfoId)=>{
    return request({
        url:`/mall/tenant/merchant/product-prize-info/get-products/${prizeInfoId}`,
        method:"post",
    })
}
/**
 * 新增模板
 */
export const addTemplate=(data)=>{
    return request({
        url:"/mall/tenant/merchant/product-prize-info/add",
        method:"post",
        data
    })
}
/**
 * 编辑模板
 */
export const editTemplate=(data)=>{
    return request({
        url:"/mall/tenant/merchant/product-prize-info/update",
        method:"post",
        data
    })
}
/**
 * 删除模板
 */
export const deleteTemplate=(data)=>{
    return request({
        url:"/mall/tenant/merchant/product-prize-info/delete",
        method:"post",
        data
    })
}
/**
 * 获取所有配件备注模板
 */
export const getAllTemplate=()=>{
    return request({
        url:"/mall/tenant/merchant/product-prize-info/getAllPrizeInfo",
        method:"post"
    })
}